<?php
/**
 * Created by PhpStorm.
 * UsersF: Mloong
 * Date: 2018/12/24
 * Time: 17:43
 */

namespace app\http\middleware;


class log
{
    /**
     * 写入日志的中间层
     * @param $request
     * @param \Closure $next
     * @return mixed
     */
    public function handle($request,\Closure $next)
    {
        $response = $next($request);
        \think\facade\Log::write(LogRecord());
        return $response;
    }
}